package com.flurry.android;

import android.text.TextUtils;
import android.util.Log;
import com.flurry.android.caching.CachingManager;
import com.flurry.android.caching.ObjectOperationData;
import com.flurry.android.responses.AppCloudSearchResultCompletionHandler;
import java.util.ArrayList;

final class eq
  implements Runnable
{
  private AppCloudSearchResultCompletionHandler gp = null;

  eq(AppCloudSearch paramAppCloudSearch, AppCloudSearchResultCompletionHandler paramAppCloudSearchResultCompletionHandler)
  {
    this.gp = paramAppCloudSearchResultCompletionHandler;
  }

  public final void run()
  {
    int i = 0;
    String str1;
    boolean bool;
    String str2;
    String str3;
    ArrayList localArrayList1;
    ArrayList localArrayList2;
    if (TextUtils.isEmpty(AppCloudSearch.a(this.gq)))
    {
      str1 = "v1/" + "user";
      bool = true;
      str2 = AppCloudSearch.b(this.gq);
      str3 = str1 + str2;
      Log.w("SearchCache", "url = " + str3);
      String str4 = AppCloudSearch.c(this.gq).contains(str2, AppCloudSearch.a(this.gq));
      if (TextUtils.isEmpty(str4))
        break label288;
      localArrayList1 = AppCloudSearch.d(this.gq).getItemsById(str4);
      localArrayList2 = new ArrayList();
      label146: if (i >= localArrayList1.size())
        break label273;
      if (!bool)
        break label232;
      AppCloudUser localAppCloudUser = new AppCloudUser();
      localAppCloudUser.q((String)localArrayList1.get(i));
      localArrayList2.add(localAppCloudUser);
    }
    while (true)
    {
      i++;
      break label146;
      str1 = "v1/" + "object/" + AppCloudSearch.a(this.gq);
      bool = false;
      break;
      label232: AppCloudObject localAppCloudObject = new AppCloudObject(AppCloudSearch.a(this.gq));
      localAppCloudObject.q((String)localArrayList1.get(i));
      localArrayList2.add(localAppCloudObject);
    }
    label273: this.gp.onOperationSucceed(localArrayList2.toArray());
    return;
    label288: ObjectOperationData localObjectOperationData = new ObjectOperationData("");
    localObjectOperationData.setSearchURL(str3);
    AppCloudSearch localAppCloudSearch = this.gq;
    AppCloudSearchResultCompletionHandler localAppCloudSearchResultCompletionHandler = this.gp;
    FlurryAppCloud.C().searchOperation(localObjectOperationData, new fa(localAppCloudSearch, bool, str2, localAppCloudSearchResultCompletionHandler));
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.flurry.android.eq
 * JD-Core Version:    0.6.2
 */